import { defineStore } from 'pinia';
// @ts-ignore
import { store } from '@/stores';

type TLoginStatusUnit = 'loginIn' | 'loginOut';
interface ICommonStore {
  loginStatus: TLoginStatusUnit;
}

export const useCommonStore = defineStore({
  id: 'common',
  state: (): ICommonStore => ({
    loginStatus: 'loginOut',
  }),
  getters: {
    getLoginStatus(): TLoginStatusUnit {
      return this.loginStatus;
    },
  },
});

export const useCommonStoreOut = () => useCommonStore(store);
